package com.felight.string;

import java.io.FileWriter;
import java.io.IOException;

/**
 * This will write character/String data into a file.
 * 
 * @author soumya
 * 
 */
public class FilewriterDemo {
	public static void main(String[] args) {
		FileWriter fw;
		try {
			fw = new FileWriter("output.txt"); // gives reference to file
			fw.write("java is object oriented lang"); // writes the string value
														// into the file
			System.out.println("file is written");
			fw.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
